import request from '@/utils/request';

// ------------------订购记录--------------------
// 订购记录列表
export const orderRecordList = params => request({
    url: '/business/Record/Order/list',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 订购记录无分页列表
export const orderRecordWaitList = params => request({
    url: '/business/Record/Order/waitList',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 订购记录新增
export const orderRecordAdd = params => request({
    url: '/business/Record/Order/add',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 订购配送方式
export const updateDelivery = params => request({
    url: '/business/Record/Order/updateDelivery',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 订购记录更新
export const orderRecordUpdate = params => request({
    url: '/business/Record/Order/update',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 订购记录删除
export const orderRecordDel = params => request({
    url: '/business/Record/Order/del',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 订购记录导出
export const orderRecordExport = params => request({
    url: '/business/Record/Order/export',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 订购记录详情
export const orderRecordGet = params => request({
    url: '/business/Record/Order/get',
    method: 'GET',
    params
});
// 订购关闭
export const orderClose = params => request({
    url: '/business/Record/Order/close',
    method: 'GET',
    params
});
// 订单详情
export const orderRecordDetail = params => request({
    url: '/business/Record/Order/getDetail',
    method: 'GET',
    params
});
// 获取用户订购单号
export const orderRecordOrderId = params => request({
    url: '/business/Record/Order/getOrderID',
    method: 'GET',
    params
});
// 获取用户订购信息
export const orderRecordOrder = params => request({
    url: '/business/Record/Order/getDisplace',
    method: 'GET',
    params

});
// 重新收费
export const getRecharging = params => request({
    url: '/business/Record/Order/getRecharging',
    method: 'GET',
    params
});
// 订购收费
export const orderPay = params => request({
    url: '/business/order/pay',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// ------------------退款记录--------------------
// 退款记录列表
export const orderBackList = params => request({
    url: '/business/order/back/list',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 订购退款保存
export const orderBackSave = params => request({
    url: '/business/order/back/save',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 订购退款获取可退金额
export const getRefundInfo = params => request({
    url: '/business/order/getRefundInfo',
    method: 'GET',
    params
});
// 订购退款
export const orderRefund = params => request({
    url: '/business/order/refund',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 退款记录详情
export const orderBackDetail = params => request({
    url: '/business/order/back/get',
    method: 'GET',
    params
});
// ------------------套餐变更--------------------
// 获取用户订购单号
export const getOrderID = params => request({
    url: '/business/Record/Order/getOrderID',
    method: 'GET',
    params
});
// 根据订购单号获取订购信息
export const getOrder = params => request({
    url: '/business/Record/Order/getOrder',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 套餐更换收费/退费
export const exchangeAdd = params => request({
    url: '/business/Record/Exchange/add',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 套餐更换记录
export const exchangeList = params => request({
    url: '/business/Record/Exchange/list',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// ------------------看检--------------------
// 订购记录列表
export const inspectionList = params => request({
    url: '/business/Record/Inspection/list',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
